//package org.application.service;
//
//import org.dxy.domain.model.board.Board;
//import org.dxy.domain.model.board.Position;
//import org.dxy.domain.service.validators.BoundaryValidator;
//import org.dxy.domain.service.validators.MoveChain;
//import org.dxy.domain.service.validators.PathBlockedValidator;
//import org.dxy.domain.service.validators.SameColorPieceValidator;
//
///**
// * 创建并组合这些验证节点，形成完整的验证流程
// */
//public class ChessMovementValidatorService {
//    private MoveChain moveChain;
//
//    public ChessMovementValidatorService() {
//        // 创建责任链
//        MoveChain boundaryValidator = new BoundaryValidator();
//        MoveChain pathBlockedValidator = new PathBlockedValidator();
//        MoveChain sameColorPieceValidator = new SameColorPieceValidator();
//
//        // 组合责任链
//        boundaryValidator.setNext(pathBlockedValidator);
//        pathBlockedValidator.setNext(sameColorPieceValidator);
//        this.moveChain = boundaryValidator;
//    }
//
//    // 验证移动是否合法
//    public boolean validateMove(Position from, Position to, Board board) {
//        return moveChain.validate(from, to, board);
//    }
//}
